package com.mo;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;

import java.net.URL;

/**
 * @author moon.pan
 * @program mo-all
 * @apiNote
 * @since 2022/4/6
 */
public class Demo {

    public static void main(String[] args) throws Exception {
        String href = "https://f4b07.bi24.cc" + "/book/140351/585_2.html";
        Document document = Jsoup.parse(new URL(href), 2000);
        Element element = document.selectFirst("#chaptercontent");

        for (Node child : element.childNodes()) {
            if (child.nodeName().equals("br")) {
                continue;
            }
            System.out.println(child);
        }

        System.out.println(document.selectFirst("#pb_next").attr("href"));
    }
}


